package cn.linter.oasys.user.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;



/**
 * @ClassName: CustomerExceptionHandler
 * @Description:
 * @author: WangZe
 * @date: 2022/4/12 21:35
 */
@RestControllerAdvice
@Slf4j
public class CustomerExceptionHandler {
   @ExceptionHandler(Exception.class)
    public Result Execption(Exception e) {
        log.error("异常！", e);
        return Result.error(ResultMsgEnum.FAIL.getCode(), e.getMessage());
  }

}
